home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-05-19 | 13.3 KB | 319 lines | [TEXT/MPS ] |
-
- ; Created: Friday, May 8, 1992 6:25 PM
- ;
- ; File: ServerControlIntf.a
- ;
- ; Assembler Interface to the Macintosh Libraries
- ; Copyright Apple Computer, Inc. 1990
- ; All Rights Reserved
- ;
- ;___________________________________________________________________________
-
- IF (&TYPE('__ServerControlIntf__') = 'UNDEFINED') THEN
- __ServerControlIntf__ SET 1
-
- IF &TYPE('__Types__') = 'UNDEFINED' THEN
- INCLUDE 'Types.a'
- ENDIF
-
- IF &TYPE('__AppleTalk__') = 'UNDEFINED' THEN
- INCLUDE 'AppleTalk.a'
- ENDIF
-
-
- ; ServerDispatch can be called synchronously only.
- ; Asynchronous server control calls are not supported.
- ; Inputs: A0 points to the SCParamBlockRec.
- ; D0 must be zero.
- ; SCParamBlockRec.scCode indicates the server control call.
- ; Outputs: D0.w and SCParamBlockRec.ioResult contain the result code.
- ; Note: Macintosh File Sharing does not return the result in D0.w
- ; so you'll need to add "MOVE.W ioResult(A0),D0" after ServerDispatch.
-
- _ServerDispatch OPWORD $A094 ; The server control dispatch trap.
-
- Macro
- _SyncServerDispatch
- MOVEQ #$00,D0
- _ServerDispatch
- MOVE.W $10(A0),D0 ;put result in D0 for Macintosh File Sharing
- Endm
-
-
- ; scCode values
- SCStartServer EQU 0
- SCShutDown EQU 2
- SCCancelShutDown EQU 3
- SCDisconnect EQU 4
- SCPollServer EQU 5
- SCGetExpFldr EQU 6
- SCGetSetupInfo EQU 7
- SCSetSetupInfo EQU 8
- SCSendMessage EQU 9
- SCGetServerStatus EQU 10
- SCInstallServerEventProc EQU 11
- SCRemoveServerEventProc EQU 12
- SCGetServerEventProc EQU 13
- SCServerVersion EQU 14
- SCSetCopyProtect EQU 16
- SCClrCopyProtect EQU 17
- SCDisconnectVolUsers EQU 18
- SCGetUserNameRec EQU 19
- SCGetUserMountInfo EQU 20
- SCWakeServer EQU 21
- SCSleepServer EQU 22
-
-
- ;scFlags bits and masks for disconnectPB
- bUNRFSendMsg EQU 13 ; send a message
- UNRFSendMsgMask EQU $2000 ; send a message
-
-
- ;These are error codes that are returned from an SCDisconnect trap
- AlreadyShuttingDown EQU -1 ; the server is already shutting down
- AlreadyDisconnecting EQU -2 ; the server is already disconnecting
-
-
- ; scServerType contains the server type, which is interpreted as follows:
- MFSType EQU $0000 ; Macintosh File Sharing
- AFSType EQU $0001 ; AppleShare File Server
-
-
- ; scServerVersion is the server version, which is currently interpreted as follows:
- ; $0030 : File Sharing Extension, versions 7.0 and 7.0.1
- ; $0031 : File Server Extension, version 3.0
- ; $0032 : File Sharing Extension, version 7.0.2
-
- ; These are some random constants for SCStartServer
- kCurInstalled EQU 0 ; the currently installed server
- kFinderExtn EQU 0 ; send high level events to the finder extension
-
-
- ;scServerFlags bits returned by SCGetServerStatus
- bJBSEnabled EQU 12 ; Set if Apple II boot service is enabled
-
-
- ; These "SCPS" integers are passed back from a SCPollServer call in scServerState:
- ; 0 means: 0 <= seconds left < 30 and Network Setup says : "Less than a minute"
- ; 1 means: 30 <= seconds left < 90 and Network Setup says : "About a minute"
- ; 2 thru 4094: x*60-30 <= seconds left < x*60+30 and NS says: "About X minutes"
- SCPSRunning EQU -1 ; Server running normally
- SCPSStartingUp EQU -2 ; Server is in the process of starting up
- SCPSJustDisabled EQU -3 ; Server is just disabled and there was no startup error
- SCPSDisabledwErr EQU -4 ; Server is disabled and there is an "SE" error in scServerError
- SCPSSleeping EQU -5 ; Server is temporarily disabled
-
-
- ; These "SCPD" integers are passed back from a SCPollServer call in scDisconnectState:
- ; 0 means: 0 <= seconds left < 30 and FileShare Monitor says : "Less than a minute"
- ; 1 means: 30 <= seconds left < 90 and FileShare Monitor says : "About a minute"
- ; 2 thru 4094: x*60-30 <= seconds left < x*60+30 and FM says: "About X minutes"
- SCPDNotDisconnecting EQU -1 ; Server not disconnecting some one or some group of users
-
-
- ; These are Server Errors ("SE") error codes returned in scServerError by a SCPollServer call
- SENoUGFileOpenErr EQU 1 ; "The Users & Groups file could not be opened."
- SENoRealVolsErr EQU 2 ; "There are no volumes for AppleShare to use."
- SEInsuffMFMemErr EQU 4 ; "There was not enough memory available to start AppleShare File Service."
- SECantRegNameErr EQU 5 ; "The File Server's name could not be registered on the AppleTalk Network."
- SECantFindExtnFolder EQU 6 ; "The File Server could not be started because the Extensions folder could not be found"
- SEUnExATalkErr EQU 7 ; "An unexpected AppleTalk error occurred."
- SENoMachineName EQU 8 ; "You must have a machine name."
- SECantFindFSExtn EQU 9 ; "The File Server could not be started because the File Sharing Extension could not be found"
- SEATalkOffErr EQU 10 ; "Appletalk is turned off."
- SEAppleTalkErr EQU 11 ; "AppleTalk could not be activated."
- SENoInitRunErr EQU 12 ; "AppleShare Setup file is not installed in the Server Folder."
- SESysTooOldErr EQU 13 ; "The System File is too old for AppleShare (v3.0)."
- SEInsuffAppMemErr EQU 14 ; "There was not enough memory for FileShare to startup."
- SEBadConfigErr EQU 15 ; "AppleShare encountered a problem with the current configuration."
- SENoDTOnStartupErr EQU 16 ; "The Desktop database on volume the startup volume could not be opened."
- SEDupNameErr EQU 17 ; "Duplicate name error when registering. Please choose another name."
-
- SetupInfoRec RECORD 0
- SIVersion DS.W 1 ; short: SetupInfoRec version: 1 for File Sharing and AppleShare 3.0
- SIFlags DS.W 1 ; short: 0 for File Sharing and AppleShare 3.0
- SIMaxLogins DS.W 1 ; short: 1..11 for File Sharing; 1..121 for AppleShare 3.0
- SISrvrUsageLimit DS.W 1 ; short: 10 to 100 (percent)
- ; All remaining fields in record are only used by the AppleShare file server
- SIVolInfoLocation DS Point ; location of Volume Info window (default is -1,-1)
- SIVolInfoVisible DS.W 1 ; Boolean: is volume Info windowvisible (default is TRUE)
- SIUserInfoLocation DS Point ; location of connected users window (default is -1,-1)
- SIUserInfoVisible DS.W 1 ; Boolean: is connectd users window visible (default is true)
- SIShutDownMins DS.W 1 ; short: default minutes until shutdown
- SISpare DS.W 17 ; Array of short : reserved
- SILoginMag DS.B 200 ; tLoginMag (STRING[199]): the current login message
- size EQU *
- ENDR
-
-
-
- SCParamBlockHeader RECORD 0
- qLink DS.L 1 ; QElemPtr
- qType DS.W 1 ; short
- ioTrap DS.W 1 ; short
- ioCmdAddr DS.L 1 ; Ptr
- ioCompletion DS.L 1 ; ProcPtr
- ioResult DS.W 1 ; OSErr
- size EQU *
- ENDR
-
-
-
- StartParam RECORD 0
- DS SCParamBlockHeader
- reserved DS.L 1 ; long
- reserved2 DS.W 1 ; short
- reserved3 DS.W 1 ; short
- scCode DS.W 1 ; short
- scStartSelect DS.W 1 ; short
- scEventSelect DS.W 1 ; short
- reserved4 DS.L 4 ; Array of long
- size EQU *
- ENDR
-
-
- DisconnectParam RECORD 0
- DS SCParamBlockHeader
- scDiscArrayPtr DS.L 1 ; LongIntPtr
- scArrayCount DS.W 1 ; short
- reserved DS.W 1 ; short
- scCode DS.W 1 ; short
- scNumMinutes DS.W 1 ; short
- scFlags DS.W 1 ; short
- scMessagePtr DS.L 1 ; StringPtr
- size EQU *
- ENDR
-
-
- PollServerParam RECORD 0
- DS SCParamBlockHeader
- reserved DS.L 1 ; long
- reserved2 DS.W 1 ; short
- reserved3 DS.W 1 ; short
- scCode DS.W 1 ; short
- scServerState DS.W 1 ; short
- scDisconnectState DS.W 1 ; short
- scServerError DS.W 1 ; short
- scSecondsLeft DS.L 1 ; long
- size EQU *
- ENDR
-
-
- StandardParam RECORD 0
- DS SCParamBlockHeader
- scNamePtr DS.L 1 ; StringPtr
- scVRefNum DS.W 1 ; short
- scLogins DS.W 1 ; short
- scCode DS.W 1 ; short
- scIndex DS.W 1 ; short
- scDirID DS.L 1 ; long
- size EQU *
- ENDR
-
-
- SetupParam RECORD 0
- DS SCParamBlockHeader
- scSetupPtr DS.L 1 ; SetupInfoRecPtr
- scMaxVolumes DS.W 1 ; short
- scMaxExpFolders DS.W 1 ; short
- scCode DS.W 1 ; short
- scCurMaxSessions DS.W 1 ; short
- size EQU *
- ENDR
-
-
- StatusParam RECORD 0
- DS SCParamBlockHeader
- scNamePtr DS.L 1 ; StringPtr
- reserved2 DS.W 1 ; short
- reserved3 DS.W 1 ; short
- scCode DS.W 1 ; short
- scServerFlags DS.W 1 ; short
- scNumSessions DS.W 1 ; short
- scUserListModDate DS.L 1 ; long
- scActivity DS.W 1 ; short
- scVolListModDate DS.L 1 ; long
- size EQU *
- ENDR
-
-
- ServerEventParam RECORD 0
- DS SCParamBlockHeader
- scSEQEntryPtr DS.L 1 ; Ptr
- reserved2 DS.W 1 ; short
- reserved3 DS.W 1 ; short
- scCode DS.W 1 ; short
- size EQU *
- ENDR
-
-
- VersionParam RECORD 0
- DS SCParamBlockHeader
- scExtNamePtr DS.L 1 ; StringPtr
- reserved2 DS.W 1 ; short
- reserved3 DS.W 1 ; short
- scCode DS.W 1 ; short
- scServerType DS.W 1 ; short
- scServerVersion DS.W 1 ; short
- size EQU *
- ENDR
-
-
- UserInfoParam RECORD 0
- DS SCParamBlockHeader
- scNamePtr DS.L 1 ; StringPtr
- reserved2 DS.W 1 ; short
- reserved3 DS.W 1 ; short
- scCode DS.W 1 ; short
- scPosition DS.L 1 ; long
- scUNRecID DS.L 1 ; long
- scUserID DS.L 1 ; long
- scLoginTime DS.L 1 ; long
- scLastUseTime DS.L 1 ; long
- scSocketNum DS AddrBlockRec
- size EQU *
- ENDR
-
-
- VolMountedParam RECORD 0
- DS SCParamBlockHeader
- reserved DS.L 1 ; Ptr
- scVRefNum DS.W 1 ; short
- reserved3 DS.W 1 ; short
- scCode DS.W 1 ; short
- scFilesOpen DS.W 1 ; short
- scWriteableFiles DS.W 1 ; short
- scUNRecID DS.L 1 ; long
- scMounted DS.B 1 ; Boolean
- scMountedAsOwner DS.B 1 ; Boolean
- size EQU *
- ENDR
-
-
- SCParamBlockRec RECORD 0
- ORG SCParamBlockRec
- startPB DS StartParam
- ORG SCParamBlockRec
- disconnectPB DS DisconnectParam
- ORG SCParamBlockRec
- pollServerPB DS PollServerParam
- ORG SCParamBlockRec
- standardPB DS StandardParam
- ORG SCParamBlockRec
- setupPB DS SetupParam
- ORG SCParamBlockRec
- statusPB DS StatusParam
- ORG SCParamBlockRec
- serverEventPB DS ServerEventParam
- ORG SCParamBlockRec
- versionPB DS VersionParam
- ORG SCParamBlockRec
- userInfoPB DS UserInfoParam
- ORG SCParamBlockRec
- volMountedPB DS VolMountedParam
- ORG
- size EQU *
- ENDR
-
-
- ENDIF ; ...already included